package network;

import java.io.*;

public class Network
{
    public static boolean sendMsg(String myString,BufferedWriter myOutput)
    {
        try
        {
            myOutput.write(myString, 0, myString.length());
            myOutput.flush();
        }
        catch (Exception e)
        {
            System.out.println(e);
            return false;
        }
        return true;
    }

    public static String recvMsg(BufferedReader myInput)
    {
        String temp;
        try
        {
            temp = myInput.readLine();
        }
        catch (Exception e)
        {
            System.out.println(e);
            return null;
        }
        
        return temp;
    }
}
